package com.huike.clues.mapper;

import com.huike.clues.domain.TbClue;
import com.huike.clues.domain.dto.TbCluePageDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TbClueMapper {
    /**
     * 查询线索管理列表接口
     */
    List<TbClue> selectTbClueList(TbCluePageDto tbCluePageDto);


    /**
     * 根据id获取线索基础信息
     */
    @Select("SELECT * FROM tb_clue WHERE id=#{id}")
    TbClue selectCluesById(Long id);

    /**
     * 查询线索池
     *
     * @param
     * @return
     */
    List<TbClue> selectTbCluePool(TbClue tbClue);

    /**
     * 通过手机号码查询用户信息
     *
     * @param phone
     * @return
     */
    @Select("SELECT* FROM tb_clue WHERE phone =#{phone}")
    TbClue getPhone(String phone);

    void insetTbClue(TbClue tbClue);
}
